package cn.ultrarisk.scadmin.manager.biz.solr.dto;

import java.io.Serializable;

/**
 * CollectionSchema
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/6/6
 * @since V1.0
 */
public class CollectionSchemaField implements Serializable {
    private static final long serialVersionUID = 3981016481751341824L;

    private String name;
    private String type;
    private Boolean indexed;
    private Boolean stored;
    private Boolean multiValued;
    private Boolean required;
    private Boolean copyField;
    private Boolean dynamicField;

    public CollectionSchemaField() {
    }

    public CollectionSchemaField(String name, String type, String indexed, String stored, String multiValued, String required, Boolean dynamicField) {
        this.name = name;
        this.type = type;
        this.indexed = indexed != null && Boolean.parseBoolean(indexed);
        this.stored = stored != null && Boolean.parseBoolean(stored);
        this.multiValued = multiValued != null && Boolean.parseBoolean(multiValued);
        this.required = required != null && Boolean.parseBoolean(required);
        this.dynamicField = dynamicField;
        this.copyField = false;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Boolean getIndexed() {
        return indexed;
    }

    public void setIndexed(Boolean indexed) {
        this.indexed = indexed;
    }

    public Boolean getStored() {
        return stored;
    }

    public void setStored(Boolean stored) {
        this.stored = stored;
    }

    public Boolean getMultiValued() {
        return multiValued;
    }

    public void setMultiValued(Boolean multiValued) {
        this.multiValued = multiValued;
    }

    public Boolean getRequired() {
        return required;
    }

    public void setRequired(Boolean required) {
        this.required = required;
    }

    public Boolean getCopyField() {
        return copyField;
    }

    public void setCopyField(Boolean copyField) {
        this.copyField = copyField;
    }

    public Boolean getDynamicField() {
        return dynamicField;
    }

    public void setDynamicField(Boolean dynamicField) {
        this.dynamicField = dynamicField;
    }
}
